// *Author：jxx
// *Contact：283591387@qq.com
// *代码由框架生成,任何更改都可能导致被代码生成器覆盖
export default function(){
    const table = {
        key: 'EquipmentID',
        footer: "Foots",
        cnName: '设备台账',
        name: 'equipment',
        newTabEdit: false,
        url: "/equipment/",
        sortName: "SerialNo"
    };
    const tableName = table.name;
    const tableCNName = table.cnName;
    const newTabEdit = false;
    const key = table.key;
    const editFormFields = {"SerialNo":"","EquipmentName":"","Status":"","InstallationDate":"","Memo":""};
    const editFormOptions = [[{"title":"设备名称","required":true,"field":"EquipmentName","colSize":6},
                               {"title":"设备编码","required":true,"field":"SerialNo","colSize":6}],
                              [{"dataKey":"status","data":[],"title":"状态","required":true,"field":"Status","type":"select"},
                               {"title":"安装日期","field":"InstallationDate","colSize":6,"type":"datetime"}],
                              [{"title":"备注","field":"Memo","colSize":12}]];
    const searchFormFields = {"SerialNo":"","EquipmentName":"","Status":"","InstallationDate":[null,null]};
    const searchFormOptions = [[{"title":"维护日期","field":"LastMaintenanceDate"}],[{"title":"设备编码","field":"SerialNo"},{"title":"设备名称","field":"EquipmentName"},{"dataKey":"status","data":[],"title":"状态","field":"Status","type":"number"},{"title":"安装日期","field":"InstallationDate","type":"range"}]];
    const columns = [{field:'EquipmentID',title:'EquipmentID',type:'string',width:120,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'SerialNo',title:'设备编码',type:'string',width:120,require:true,align:'left'},
                       {field:'EquipmentName',title:'设备名称',type:'string',width:180,require:true,align:'left'},
                       {field:'Status',title:'状态',type:'int',bind:{ key:'status',data:[]},width:120,require:true,align:'left'},
                       {field:'InstallationDate',title:'安装日期',type:'datetime',width:110,align:'left'},
                       {field:'LastMaintenanceDate',title:'维护日期',type:'datetime',width:110,align:'left'},
                       {field:'UpdateUser',title:'维护人员',type:'string',width:120,align:'left'},
                       {field:'Memo',title:'备注',type:'string',width:120,align:'left'}];
    const detail ={columns:[]};
    const details = [];

    return {
        table,
        key,
        tableName,
        tableCNName,
        newTabEdit,
        editFormFields,
        editFormOptions,
        searchFormFields,
        searchFormOptions,
        columns,
        detail,
        details
    };
}